package com.example.administrator.liveapp.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Created by Administrator on 2017/6/13 0013.
 */

public class CheckInfoUtill {
    /* 本地校验手机号码段 正则表达式
     *
             * @param mobiles
     *            号码字符串
     * */
    public static final boolean isMobileNO(String mobiles) {
        Pattern p = Pattern.compile("^((1[3,5,8][0-9])|(14[5,7])|(17[0,6,7,8]))\\d{8}$");
        Matcher m = p.matcher(mobiles);
        // System.out.println(m.matches() + "---");
        return m.matches();
    }
    public static final boolean isPasswordNO(String password) {
        Pattern p = Pattern.compile("^[a-zA-Z0-9]{6,16}$");
        Matcher m = p.matcher(password);
        // System.out.println(m.matches() + "---");
        return m.matches();
    }
}
